export default {
    template: `<h1>产品详情</h1>`,
    //路由进入之前
    beforeRouteEnter(to, from, next) {
        console.log("组件导航守卫 进入产品详情路由");
        console.log(this);
        next();
    },
    beforeRouteUpdate(to, from, next) {
        console.log("组件导航守卫 路由更新的时候");
        console.log(this);
        next();
    },
    //路由离开的时候
    beforeRouteLeave(to, from, next) {
        console.log("组件导航守卫 离开 /product 路由");
        console.log("现在的路由", from);
        console.log("前往的路由", to);
        console.log(this);
        next();
    }
}